import request from '@/utils/request'

// 获取获取部门负责人信息/获取员工简单列表 /sys/user/simple
export const getUserSimpleRequest = params => request.get('/sys/user/simple', { params })

// 获取员工列表
export const getUserListRequest = params => request.get('/sys/user', { params })

// 添加员工
export const addUserListRequest = data => request.post('/sys/user', data)

// 删除员工
export const deleteUserListRequest = id => request.delete(`/sys/user/${id}`)

// 获取员工基本信息 - 点击查看员工详情, 数据回显
export const getUserSimpleDetailRequest = id => request.get(`/sys/user/${id}`)

// 保存员工基本信息 - 修改员工姓名密码后更新数据
export const uploadUserSimpleDetailRequest = data => request.put(`/sys/user/${data.id}`, data)

// 给员工分配角色
export const giveAssignPermissionRequest = data => request.put('/sys/user/assignRoles', data)
